Finding Euler Tours in One Pass in the W-Streaming Model with O(n log(n)) RAM
نویسندگان
چکیده
We study the problem of finding an Euler tour in an undirected graph G in the W-Streaming model with O(n polylog(n)) RAM, where n resp. m is the number of nodes resp. edges of G . Our main result is the first one pass W-Streaming algorithm computing an Euler tour of G in the form of an edge successor function with only O(n log(n)) RAM which is optimal for this setting (e.g., Sun and Woodruff (2015)). The previously best-known result in this model is implicitly given by Demetrescu et al. (2010) with the parallel algorithm of Atallah and Vishkin (1984) using O(m/n) passes under the same RAM limitation. For graphs with ω(n) edges this is non-constant. Our overall approach is to partition the edges into edge-disjoint cycles and to merge the cycles until a single Euler tour is achieved. Note that in the W-Streaming model such a merging is far from being obvious as the limited RAM allows the processing of only a constant number of cycles at once. This enforces us to merge cycles that partially are no longer present in RAM. Furthermore, the successor of an edge cannot be changed after the edge has left RAM. So, we steadily have to output edges and their designated successors, not knowing the appearance of edges and cycles yet to come. We solve this problem with a special edge swapping technique, for which two certain edges per node are sufficient to merge tours without having all of their edges in RAM. Mathematically, this is controlled by structural results on the space of certain equivalence classes corresponding to cycles and the characterization of associated successor functions. For example, we give conditions under which the swapping of edge successors leads to a merging of equivalence classes. The mathematical methods of our analysis might be of independent interest for other routing problems in streaming models 1 ar X iv :1 71 0. 04 09 1v 1 [ cs .D S] 1 1 O ct 2 01 7
منابع مشابه
Finding Euler Tours in the StrSort Model
We present a first algorithm for finding Euler tours in undirected graphs in the StrSort model. This model is a relaxation of the semi streaming model. The graph is given as a stream of its edges and can only be read sequentially, but while doing a pass over the stream we are allowed to write out another stream which will be the input for the next pass. In addition, items in the stream are sort...
متن کاملFinding a Duplicate and a Missing Item in a Stream
We consider the following problem in a stream model: Given a sequence a = 〈a1, a2, . . . , am〉 wich each ai ∈ [n] = {1, . . . , n} and m > n, find a duplicate in the sequence, i.e., find some d = ai = al with i = l by using limited s bits of memory and r passes over the input sequence. In one pass an algorithm reads the input sequence a in the order a1, a2, . . . , am. Since m > n, a duplicate ...
متن کاملFinding Longest Increasing and Common Subsequences in Streaming Data
In this paper, we present algorithms and lower bounds for the Longest Increasing Subsequence (LIS) and Longest Common Subsequence (LCS) problems in the data streaming model. For the problem of deciding whether the LIS of a given stream of integers drawn from {1, . . . ,m} has length at least k, we discuss a one-pass streaming algorithm using O(k log m) space, with update time either O(log k) or...
متن کاملWorst Case Efficient Single and Multiple String Matching in the RAM Model
In this paper, we explore worst-case solutions for the problems of single and multiple matching on strings in the word RAM model with word length w. In the first problem, we have to build a data structure based on a pattern p of length m over an alphabet of size σ such that we can answer to the following query: given a text T of length n, where each character is encoded using log σ bits return ...
متن کاملApproximate pattern matching with k-mismatches in packed text
Given strings P of length m and T of length n over an alphabet of size σ, the string matching with k-mismatches problem is to find the positions of all the substrings in T that are at Hamming distance at most k from P . If T can be read only one character at the time the best known bounds are O(n √ k log k) and O(n+ n √ k/w log k) in the word-RAM model with word length w. In the RAM models (inc...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- CoRR
دوره abs/1710.04091 شماره
صفحات -
تاریخ انتشار 2017